Next | Prev | Up | Top | Contents | Index
Synchronized Schedulers: the Sync-Master Process
A variety of program designs is possible but the simplest is possibly the set of processes described in the following paragraphs.
The master process executes first and performs these steps:
- Initialize global resources such as memory-mapped segments, memory arenas, files, asynchronous I/O, and other resources. One global resource is the process ID of the master process.
- Lock the address space shared with lightweight processes.
- Create the sync-master Frame Scheduler using the call frs_create_master(), and store its handle in a global location.
- Create one FRS control process for each synchronized CPU to be used.
- Create the activity processes that will be scheduled by the master Frame Scheduler and use frs_enqueue() to enqueue them to their assigned minor frames.
- Set up signal handlers for signals from the Frame Scheduler (see "Using Signals Under the Frame Scheduler").
- Use frs_start() (Table 7-1) to tell the master Frame Scheduler that its activity processes are all enqueued.
The master Frame Scheduler will start scheduling processes as soon as all processes have called frs_join() for their respective schedulers.
- Wait for termination or error signals.
- Use frs_destroy() to terminate the master Frame Scheduler.
- Tidy up global resources as required.
Next | Prev | Up | Top | Contents | Index